{% extends 'home/base.html' %}
{% block title %}STOKING{% endblock %}
{% block heading %}STOKING{% endblock %}
{% block body %}

<form action="/stock/quick_delete/" method="POST">{% csrf_token %}
      <ul class="collapsible popout" data-collapsible="accordion">
        <li>
          <div class="collapsible-header"><i class="material-icons">check_box_outline_blank</i>In expiry date</div>
          <div class="collapsible-body">
            <ul class="collapsible popout" data-collapsible="accordion">
              {% for stocks in goodstock %}
              <li>
                <div class="collapsible-header blue-grey">
                  <i class="material-icons">
                    assignment_turned_in
                  </i>
                  {{stocks.item.item_name}} 产品存量： {{stocks.quantity}} 过期时间：{{ stocks.expiry_date }}
                </div>
                <div class="collapsible-body">
                  <span>Item name</span> <span class="blue-text text-lighten-1">{{stocks.item.item_name}}</span><br>
                  <span>manufacturer</span> <span class="blue-text text-lighten-1">{{stocks.item.manufacturer}}</span><br>
                  <span>description</span> <span class="blue-text text-lighten-1">{{stocks.item.description}}</span><br>
                  <span>Quantity</span> <span class="blue-text text-lighten-1">{{stocks.quantity}}</span><br>
                  <span>Date</span> <span class="blue-text text-lighten-1">{{stocks.purchase_date}}</span><br>
                  <span>Date_expire</span> <span class="blue-text text-lighten-1">{{stocks.expiry_date}}</span><br>
                  {% if isInventory_manager %}
                 <span><a href="/stock/change_stock/{{stocks.pk}}" class="btn-floating btn-large halfway-fab waves-effect waves-light red right-align"><i class="material-icons">mode_edit</i></a></span>
                  {% endif %}
                </div>
              </li>
              {% endfor %}
            </ul>
          </div>
        </li>
            <li>
          <div class="collapsible-header"><i class="material-icons">check_box_outline_blank</i>Out of expiry date</div>
          <div class="collapsible-body">
            <ul class="collapsible popout" data-collapsible="accordion">
              {% for stocks in badstock %}
              <li>
                <div class="collapsible-header blue-grey"><i class="material-icons">assignment_turned_in</i>
                    {{stocks.item.item_name}} 产品存量： {{stocks.quantity}} 过期时间：{{ stocks.expiry_date }}</div>
                  <div class="collapsible-body">

                  <input type="checkbox" class="filled-in" id="filled-in-box{{stocks.pk}}" name="ids" unchecked value="{{stocks.pk}}" />
                  <label for="filled-in-box{{stocks.pk}}"><span>Select</span></label><br>

                 <span>Item name</span> <span class="blue-text text-lighten-1">{{stocks.item.item_name}}</span><br>
                  <span>manufacturer</span> <span class="blue-text text-lighten-1">{{stocks.item.manufacturer}}</span><br>
                  <span>description</span> <span class="blue-text text-lighten-1">{{stocks.item.description}}</span><br>
                  <span>Quantity</span> <span class="blue-text text-lighten-1">{{stocks.quantity}}</span><br>
                  <span>Date</span> <span class="blue-text text-lighten-1">{{stocks.purchase_date}}</span><br>
                  <span>Date_expire</span> <span class="blue-text text-lighten-1">{{stocks.expiry_date}}</span><br>
                    {% if isInventory_manager %}
                    <span class="right-align"><a href="/stock/change_stock/{{stocks.pk}}" class="btn-floating btn-large halfway-fab waves-effect waves-light red right-align"><i class="material-icons">mode_edit</i></a></span>
                    {% endif %}
                </div>
              </li>
              {% endfor %}
              <button type="submit" class="btn" href="/stock/quick_delete/" >delete</button>
            </ul>
          </div>
        </li>
      </ul>
</form>
{% endblock %}